<template>
	<view>
		<view class="address-add">
			<view class="linkitem">
				<text class="f1">联 系 人：</text>
				<input type="text" class="input" v-model="fullname" placeholder="请输入您的姓名"
					placeholder-style="color:#626262;font-size:28rpx" />
			</view>
			<view class="linkitem">
				<text class="f1">联系电话：</text>
				<input type="text" class="input" v-model="mobile" placeholder="请输入您的手机号"
					placeholder-style="color:#626262;font-size:28rpx" />
			</view>
			<view class="linkitem">
				<text class="f1">微 信 号：</text>
				<input type="text" class="input" v-model="wechat" placeholder="请输入您的微信号"
					placeholder-style="color:#626262;font-size:28rpx" />
			</view>
		</view>

		<view class="address-add">
			<view class="flex align-start">
				<image :src="opt.project_img" class="image_4"></image>
				<text lines="1" class="margin-left text-group_9">{{opt.project_name}}</text>
			</view>
		</view>


		<view class="text-center" style="margin-top:200rpx;" @click="submit">
			<button class="cu-btn lg round" style="width: 80%;background: #994278;color: #FFFFFF;">报名</button>
		</view>
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				wechat: '',
				mobile: '',
				fullname: '',
				opt:{},
			}
		},
		onLoad(opt) {
			console.log(opt)
			this.opt = opt
		},
		methods: {
			submit() {
				app.post("ApiProjectPublish/joinproject", {
					proid: this.opt.id,
					fullname: this.fullname,
					mobile: this.mobile,
					wechat: this.wechat
				}, (res) => {
					console.log(res)
					if(res.status==1){
						uni.showToast({
							icon:'success',
							title:res.msg
						})
						uni.navigateBack()
					}else{
						uni.showToast({
							icon:'error',
							title:res.msg
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.address-add {
		width: 94%;
		margin: 20rpx 3%;
		background: #fff;
		border-radius: 20rpx;
		padding: 20rpx 3%;
		min-height: 140rpx;
	}

	.address-add .f1 {
		margin-right: 20rpx
	}

	.linkitem {
		width: 100%;
		padding: 1px 0;
		background: #fff;
		display: flex;
		align-items: center
	}

	.cf3 {
		width: 200rpx;
		height: 26rpx;
		display: block;
		text-align: right;
	}

	.linkitem .f1 {
		width: 160rpx;
		color: #111111
	}

	.linkitem .input {
		height: 50rpx;
		padding-left: 10rpx;
		color: #222222;
		font-weight: bold;
		font-size: 28rpx;
		flex: 1
	}

	.image_4 {
		width: 216rpx;
		height: 156rpx;
	}

	.text-group_9 {
		overflow-wrap: break-word;
		color: rgba(24, 29, 24, 1);
		font-size: 36rpx;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 50rpx;
		margin-top: 10rpx;
	}
</style>